package com.huike.clues.mapper;

import com.huike.clues.domain.TbClueTrackRecord;
import com.huike.clues.domain.vo.ClueTrackRecordVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TbClueTrackRecordMapper {
    //新增跟进线索信息
    @Insert("insert into tb_clue_track_record values (null,#{clueId},#{createBy},#{subject},#{record},#{level},#{createTime},#{type},#{falseReason},#{nextTime})")
    Integer insertTbClueTrackRecord(TbClueTrackRecord tbClueTrackRecord);

    /**
     * 根据线索id查询线索跟进记录
     * @param clueId
     * @return
     */
    @Select("SELECT id, clue_id, create_by, subject, record, `level`, create_time, `type`, false_reason, next_time FROM tb_clue_track_record WHERE clue_id = #{clueId}")
    List<TbClueTrackRecord> selectTbClueTrackRecordListByClueId(Long clueId);
}
